<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		.box{
			width: 200px;
			height: 200px;
			background: red url() 0 0 no-repeat;
			font-size: 30px;
			text-align: center;
			color: #fff;
			line-height: 200px;
		}

	</style>
	<script type="text/javascript">
		window.onload = function  () {


			box = document.getElementById('box');
			btn = document.getElementById('btn');

			btn.onclick = function  () {
				time = setInterval(run, 1000)
			}

			num=60
			function run () {
				if(num==0){
					clearInterval(time)
				}
				box.innerHTML = num;
				num--;
			}








			
		}
	</script>
</head>
<body>
	<div id="box" class="box"></div>
	<input type="button" value="开始" id="btn">
</body>
</html>